<template>
  <nut-cell title="请选择城市" :desc="desc.text" @click="()=>{show=true}"></nut-cell>
  <nut-picker
    v-model:visible="show"
    :columns="cityColumns"
    v-model:value="desc.value"
    title="城市选择"
    @confirm="confirm"
  >
  </nut-picker>
</template>
<script>
  import { ref } from 'vue';
  import {cityColumns,cityColumns2} from '@/apis/utils/dict.js';
  export default {
    setup(props) {
      const show = ref(false);
      const desc = {value:"ZheJiang",text: "浙江市"};
      const confirm = ( { selectedValue,selectedOptions })=>{
        desc.value =  selectedOptions[0].value
        desc.text = selectedOptions[0].text;
        // console.log(desc);
      };      
      return {show,desc,cityColumns,confirm};
    }
  };
</script>

